<template>
  <div class="card">
    <van-grid square>
      <van-grid-item
        v-for="menu in menuList"
        :key="menu.name"
        :icon="menu.icon || 'star-o'"
        :text="menu.name"
        :to="menu.url"
        :dot="menu.dot"
      />
    </van-grid>
  </div>
</template>
<script setup>
import { ref, defineProps } from 'vue'
const props = defineProps({
  accountId: {
    type: [String, Number]
  }
})
const menuList = ref([
  {
    name: '比赛',
    icon: 'orders-o',
    url: `/game/${props.accountId}`
  },
  {
    name: '英雄',
    icon: 'bar-chart-o',
    url: `/hero/${props.accountId}`
  },
  {
    name: '好友',
    icon: 'friends-o',
    url: `/peer/${props.accountId}`
  },
  {
    name: '记录',
    icon: 'medal-o',
    url: `/record/${props.accountId}`
  },
  {
    name: '历史',
    icon: 'underway-o',
    url: `/history/${props.accountId}`
  },
  {
    name: '眼位',
    icon: 'eye-o',
    url: `/wardmap/${props.accountId}`
  },
  {
    name: '词云',
    icon: 'chat-o',
    url: `/wordcloud/${props.accountId}`
  },
  {
    name: '活动',
    icon: 'flag-o',
    url: `/activity/list/${props.accountId}`
  }
])
</script>
